package com.ruoyi.orderview.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.orderview.domain.StaticProcess;
import com.ruoyi.orderview.mapper.StaticProcessMapper;
import com.ruoyi.orderview.service.IStaticProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * VIEWService业务层处理
 *
 * @author ruoyi
 * @date 2022-02-20
 */
@Service
public class StaticProcessServiceImpl implements IStaticProcessService
{
    @Autowired
    private StaticProcessMapper staticProcessMapper;

    /**
     * 查询VIEW
     *
     * @param id VIEW主键
     * @return VIEW
     */
    @Override
    public StaticProcess selectStaticProcessById(Long id)
    {
        return staticProcessMapper.selectStaticProcessById(id);
    }

    /**
     * 查询VIEW列表
     *
     * @param staticProcess VIEW
     * @return VIEW
     */
    @Override
    public List<StaticProcess> selectStaticProcessList(StaticProcess staticProcess)
    {
        return staticProcessMapper.selectStaticProcessList(staticProcess);
    }

    /**
     * 新增VIEW
     *
     * @param staticProcess VIEW
     * @return 结果
     */
    @Override
    public int insertStaticProcess(StaticProcess staticProcess)
    {
        staticProcess.setCreateTime(DateUtils.getNowDate());
        return staticProcessMapper.insertStaticProcess(staticProcess);
    }

    /**
     * 修改VIEW
     *
     * @param staticProcess VIEW
     * @return 结果
     */
    @Override
    public int updateStaticProcess(StaticProcess staticProcess)
    {
        staticProcess.setUpdateTime(DateUtils.getNowDate());
        return staticProcessMapper.updateStaticProcess(staticProcess);
    }

    /**
     * 批量删除VIEW
     *
     * @param ids 需要删除的VIEW主键
     * @return 结果
     */
    @Override
    public int deleteStaticProcessByIds(Long[] ids)
    {
        return staticProcessMapper.deleteStaticProcessByIds(ids);
    }

    /**
     * 删除VIEW信息
     *
     * @param id VIEW主键
     * @return 结果
     */
    @Override
    public int deleteStaticProcessById(Long id)
    {
        return staticProcessMapper.deleteStaticProcessById(id);
    }
}
